<?php
/*
 * Created on 14.04.2007
 * @filesource: mod_extensionicons.php
 * @author: Nikolai Plath
 */

defined( '_VALID_MOS' ) or die( 'Direct Access to this script is not allowed' );

if ( @$_GET['hidemainmenu'] == 1 | @$_POST['hidemainmenu'] == 1 )
{
	echo "Disabled";
} else
{
	global $database;
	$showdiv = intval( $params->get( 'showdiv', 1 ) );
	$database->setQuery("SELECT * FROM #__extension_icons"
						. "\n WHERE published = 1"
					    . "\n ORDER BY ordering");
	$rows = $database->loadObjectList();
	
	foreach ( $rows as $row )
	{
		if ( $showdiv )
		{
			echo '<div>';
		}
		
		echo '<a href="' . $mosConfig_live_site . '/administrator/index2.php?'
		 . $row->admin_menu_link . '">'
		 . '<img src="' . $mosConfig_live_site . '/includes/' . $row->admin_menu_img . '"'
		 . ' align="middle" border="0"'
		 . ' alt="' . $row->admin_menu_alt . '"'
		 . ' title="' . $row->admin_menu_alt . '"'
		 . ' /></a>';
		
		if ( $showdiv )
		{
			echo '</div>';
		}

	}//foreach
}//if hidemainmenu
?>
